<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="ddp-type-contents ddp-resize2 ddp-type2" *ngIf="isShow">
  <!-- 닫기 버튼 -->
  <a href="javascript:" class="ddp-btn-close" (click)="closeComp();"></a>
  <!-- //닫기 버튼 -->

  <!-- 제목 영역 -->
  <div class="ddp-icon-name" >
    <div class="ddp-ui-name2">
      <!-- <em class="ddp-icon-newlink2"></em>-->
      {{'msg.board.create.title' | translate}}
      <span class="ddp-txt-info">{{'msg.board.create.cmplt' | translate}}</span>
      <em class="ddp-bg-order-line2-type2"></em>
    </div>
  </div>
  <!-- // 제목 영역 -->

  <!-- 내용 영역  -->
  <div class="ddp-type-contents-in">
    <div class="ddp-box-popupcontents2">
      <!-- 생성 정보 요약 -->
      <div class="ddp-wrap-boxtype">
        <table class="ddp-wrap-boxdata">
          <colgroup>
            <col width="120px" />
            <col width="*" />
          </colgroup>
          <tbody>
            <tr>
              <th>{{'msg.comm.ui.sel.book' | translate}}</th>
              <td> {{workbookName}} </td>
            </tr>
            <tr>
              <th> {{'msg.comm.ui.sel.ds' | translate}} </th>
              <td [innerHTML]="getDatasourceNames()"></td>
            </tr>
          </tbody>
        </table>
      </div>
      <!-- // 생성 정보 요약 -->

      <!-- edit -->
      <div class="ddp-wrap-edit2" [class.ddp-error]="isInvalidName">
        <label class="ddp-label-type">{{'msg.comm.ui.name' | translate}}</label>
        <input type="text" class="ddp-input-type" placeholder="{{'msg.comm.ui.create.name' | translate}}"
               [(ngModel)]="dashboard.name" (focus)="isInvalidName=false" maxlength="50" />
        <!-- error -->
        <span class="ddp-ui-error">{{errMsgName}}</span>
        <!-- error -->
      </div>
      <!-- //edit -->

      <!-- edit -->
      <div class="ddp-wrap-edit2" [class.ddp-error]="isInvalidDesc">
        <label class="ddp-label-type">{{'msg.comm.ui.description' | translate}}</label>
        <input type="text" class="ddp-input-type" placeholder="{{'msg.comm.ui.create.desc' | translate}}"
               [(ngModel)]="dashboard.description" (focus)="isInvalidDesc=false" maxlength="150" />
        <!-- error -->
        <span class="ddp-ui-error">{{errMsgDesc}}</span>
        <!-- error -->
      </div>
      <!-- //edit -->
    </div>

  </div>
  <!-- // 내용 영역 -->

  <!-- buttons -->
  <div class="ddp-ui-buttons">
    <a (click)="isShow = false;" href="javascript:" class="ddp-btn-type-popup">{{'msg.comm.btn.previous' | translate}}</a>
    <a (click)="complete();"
       [class.ddp-disabled]="isInvalidName || isInvalidDesc || !dashboard.name || '' === dashboard.name"
       href="javascript:" class="ddp-btn-type-popup ddp-bg-black" >{{'msg.comm.btn.done' | translate}}</a>
  </div>
  <!-- //buttons -->

</div>
